package com.csyuejia.paylib;

public class PayUtils {
    /**
     * 获取json
     *
     * @param names
     * @param strs
     * @return
     */
    public static String getJson(String[] names, String[] strs) {
        StringBuilder result = new StringBuilder("{\"");
        for (int i = 0; i < strs.length; i++) {
            result = result.append(names[i] + "\"");
            result = result.append(":\"");
            result = result.append(strs[i] + "\"");
            if (i < strs.length - 1)
                result = result.append(",\"");
        }
        result = result.append("}");

        return result.toString();
    }
}
